@layout("/common/_container.html",{bg:"bg-white",js:["/assets/modular/goods/goods_detail.js"]}){
<form id="goodsForm" lay-filter="goodsForm" class="layui-form model-form">
    <input name="id" id="id" type="hidden"/>


    <#pic id="imgShowVal" name="商品图片"  hiddenInput="headpic"  />
    <div class="layui-form-item">
        <label class="layui-form-label">一级分类<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="firstCategory" name="firstCategory" readonly  value="${goods.firstCategory}" placeholder="请输入商品编号" type="text" class="layui-input" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">二级分类<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="secCategory" name="secCategory"  readonly  value="${goods.secCategory}" placeholder="请输入商品中文名" type="text" class="layui-input" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品编号<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="goodsNo" name="goodsNo" readonly  value="${goods.goodsNo}" placeholder="请输入商品编号" type="text" class="layui-input" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品中文名<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="name" name="name"  readonly  value="${goods.name}" placeholder="请输入商品中文名" type="text" class="layui-input" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品标题<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="title" name="title" readonly  value="${goods.title}"  placeholder="请输入商品标题" type="text" class="layui-input" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">批次号<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="batchNo" name="batchNo" readonly  value="${goods.batchNo}" placeholder="请输入批次号" type="text" class="layui-input" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否拼单商品<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="productMerge" name="productMerge" readonly   type="text" class="layui-input"
                @if(goods.productMerge=="1"){
                    value="是"
                   @}else{
                   value="否"
                   @}
            />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序权重<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="weigh" name="weigh"  readonly value="${goods.weigh}" placeholder="请输入排序权重" type="text" class="layui-input" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">运费<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="shipFee" name="shipFee" readonly  value="${goods.shipFee}"  placeholder="请输入运费" type="number" class="layui-input" />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品标签</label>
        <div class="layui-input-block" id="labelBox">
            <input id="labelName" name="labelName" placeholder="商品标签"   type="text" class="layui-input" readonly />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品状态<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="goodsStatusName" readonly  name="goodsStatusName" value="${goods.goodsStatusName}" type="text" class="layui-input"  />
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block" style="color: red;">Tip :以下三个配置为页面可选显示部分,无内容则不显示</div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">使用说明</label>
        <div class="layui-input-block" >
            <input id="instructionsId" name="instructionsId" placeholder="请选择使用说明" type="hidden" class="layui-input"  />
            <input id="instructionsName" name="instructionsName" placeholder="使用说明" type="text" class="layui-input" disabled />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品溯源</label>
        <div class="layui-input-block" >
            <input id="traceabilityId" name="traceabilityId" placeholder="商品溯源" type="hidden" class="layui-input"  />
            <input id="traceabilityName" name="traceabilityName" placeholder="商品溯源" type="text" class="layui-input" disabled />
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">关注公众号</label>
        <div class="layui-input-block" >
            <input id="weixinId" name="weixinId"  type="hidden" class="layui-input"  />
            <input id="weixinName" name="weixinName" placeholder="关注公众号"  type="text" class="layui-input"  disabled />
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">新增时间<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="createTime" name="createTime" readonly value="${goods.createTime}" placeholder="请输入新增时间" type="text" class="layui-input" />
        </div>
    </div>
    <div id="description" style="display:none;">
    </div>
    <div class="layui-form-item" id="goodsDetailBox">
        <div class=" layui-col-md12 layui-bg-green" style="  height: 40px; font-size: 20px;text-align: center; margin-bottom: 10px;"><p style="margin-top: 7px"><i class="layui-icon layui-icon-reply-fill" style="  color:#01AAED; font-size: 15px"></i>商品详情</p></div>
        <div>
            <div id="description_text" class="text"style=" height:500px; overflow:auto;border: 1px solid grey;margin-left: 10px"  >
            </div>
        </div>
    </div>

    <div class="layui-row layui-form-item" >
        <div class=" layui-col-md12 layui-bg-green " style="  height: 40px; font-size: 20px;text-align: center; "><p style="margin-top: 8px">  <i class="layui-icon layui-icon-templeate-1" style="color:#01AAED;  font-size: 15px"></i>商品规格</p></div>
        </div>
        <div class="layui-collapse" lay-accordion>
            @for(sku in  skuList){
            <div class="layui-colla-item">
                <h2 class="layui-colla-title" style="background-color:#009688 ;">${sku.skuName}</h2>
                <div class="layui-colla-content layui-show ">
                    <div class="layui-col-md12">
                        <#pic boxid="editSkuPicBox" avaterImg="${ctxPath}${sku.skuPic}"  name="商品图片"  hiddenInput="skuPic" />
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">规格名称<span style="color: red;">*</span></label>
                                <div class="layui-input-block">
                                    <input id="skuName" name="skuName" readonly value="${sku.skuName}" placeholder="请输入规格名称" type="text" class="layui-input" lay-verify="required" required/>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">规格描述<span style="color: red;">*</span></label>
                                <div class="layui-input-block">
                                    <input id="skuDesc" name="skuDesc" readonly value="${sku.skuDesc}"  placeholder="请输入规格描述" type="text" class="layui-input" lay-verify="required" required/>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">价格<span style="color: red;">*</span></label>
                                <div class="layui-input-block">
                                    <input id="price" name="price" readonly value="${sku.price}"  type="number" placeholder="请输入价格" type="text" class="layui-input" lay-verify="required" required/>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">拼单价格<span style="color: red;">*</span></label>
                                <div class="layui-input-block">
                                    <input id="priceMerge" name="priceMerge" readonly value="${sku.priceMerge}"  type="number" placeholder="请输入价格" type="text" class="layui-input" lay-verify="required" required/>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="layui-form-item">
                                <label class="layui-form-label">库存<span style="color: red;">*</span></label>
                                <div class="layui-input-block">
                                    <input id="stock" name="stock" readonly  value="${sku.stock}" type="number" placeholder="请输入库存" type="text" class="layui-input" lay-verify="required" required/>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">重量<span style="color: red;">*</span></label>
                                <div class="layui-input-block">
                                    <input id="weight" name="weight" readonly value="${sku.weight}" type="number" placeholder="请输入重量" type="text" class="layui-input" lay-verify="required" required/>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">成本<span style="color: red;">*</span></label>
                                <div class="layui-input-block">
                                    <input id="cost" name="cost" readonly value="${sku.cost}" type="number" placeholder="请输入成本" type="text" class="layui-input" lay-verify="required" required/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            @}

        </div>
    </div>
    <div class="layui-form-item text-right">
        <button class="layui-btn " type="button" ew-event="closeDialog">关闭</button>
    </div>
</form>

@}